package com.sy.structural.composite;

public class MainTest {

    public static void main(String[] args) {
        Menu root = new Menu("系统管理", 1);

        Menu order = new Menu("订单管理", 2);
        Menu user = new Menu("用户管理", 3);

        root.addMenu(order);
        root.addMenu(user);

        Menu deleteUser = new Menu("用户删除", 4);
        Menu addUser = new Menu("用户增加", 5);

        user.addMenu(deleteUser);
        user.addMenu(addUser);

        root.printMenu();
    }
}
